package connect

import (
	"github.com/segmentio/kafka-go"
	"time"
)

var (
	Brokers = []string{"127.0.0.1:9091", "127.0.0.1:9092", "127.0.0.1:9093"}
)

type KafkaConnectManager struct {
	Client *kafka.Client
}

func GetKafkaConnectManager() *KafkaConnectManager {
	return &KafkaConnectManager{
		Client: &kafka.Client{
			Addr: kafka.TCP(Brokers...),
			Transport: &kafka.Transport{
				DialTimeout: 10 * time.Second,
			},
		},
	}
}
